<#include "../common/_layout.html"/>
<@head title="">
<style type="text/css">
    .cll {
        background-color: #ddd;
    }
</style>
</@head>
<@layout menu='/wexinmsg'>
<!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        舟山汇智智能科技有限公司
    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li><a href="#">lte</a></li>
        <li class="active">prj</li>
    </ol>
</section>

<!-- Main content -->
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <form action="/wexinmsg" id="listForm" method="post" role="form" class="form-inline">
                 <input type="hidden" name="id" id="id" value="${id!}">
                    <div class="box-header">
                        <h3 class="box-title">${wx.name!}</h3>
                        <div class="box-tools"></div>
                    </div><!-- /.box-header -->
                    <div style="width: 600px">
                    <div class="form-group">
						<label for="content">消息内容</label> <input name="content" class="form-control"
							id="content" style="width: 150px" placeholder="手机号#"
							value="${content!}">
					</div>
					<div class="form-group" >
						<label for="reservation">时间段</label> <input type="text" class="form-control"
							name="reservation" id="reservation" style="width: 250px" placeholder="时间"
							value="${reservation!}">
					</div>
					
					<button class="btn btn-sm btn-default" value="查询">搜索</button>
					</div>
                        <button type="button" id="deleteButton" disabled="disabled" class="btn btn-default"
                                onclick="deleteAll('${ctx}/wexinmsg/delete')">删除
                        </button>
                        <button type="button" class="btn btn-default"
							onclick="location.href='${ctx}/wexinmsg/exportExcel?id=${id!}&content=${content!}&reservation=${reservation!}'">导出</button>
                        <table class="table table-hover">
                            <tr class="info">
                                <th title="ID"><input type="checkbox" id="allCheck"></th>
                                <th title="发送方昵称">发送方昵称</th>
                                <th title="消息内容">消息内容</th>
                                <th title="消息创建时间">消息创建时间</th>
                            </tr>
                            <#list page.getList() as item>
                                <tr>
                                    <td><input type="checkbox" name="ids" value="${item.id!}"></td>
                                    <td>${item.nickname!}</td>
                                    <td>
									<#if item.content?length lt 20 >${item.content!}
									<#else>${item.content[0..*21]}...</#if>
                                    </td>
                                    <td>${item.times!}</td>
                                </tr>
                            </#list>
                        </table>
                        <#if (page.list?size>0)>
                        <#include "../common/pager.html">
                        </#if>
                </form>
            </div>
        </div>
    </div>
    <div class="row">
		<div class="col-xs-12">
			<button type="submit" class="btn btn-cancle"
				onclick="javascript :history.back(-1);">返回</button>
		</div>
	</div>
</section>
</@layout>
<@scripts>
<script type="text/javascript" src="/adminlte/plugins/bootbox/bootbox.min.js"></script>
<script type="text/javascript" src="/js/list.js"></script>
<script type="text/javascript" src="${ctx}/adminlte/plugins/moment/moment.min.js"></script>
<script type="text/javascript" src="${ctx}/adminlte/plugins/moment/zh-cn.js"></script>
<script type="text/javascript" src="${ctx}/adminlte/plugins/daterangepicker/daterangepicker.js"></script>
<script type="text/javascript">
$(document).ready(function () {
	moment.locale("zh-cn");
	$('#reservation').daterangepicker({format: 'YYYY/MM/DD' , locale : {
            applyLabel: '确定',
            cancelLabel: '取消',
            fromLabel: '从',
            toLabel: '到',
            weekLabel: 'W',
            customRangeLabel: 'Custom Range',
            daysOfWeek: moment.weekdaysMin(),
            monthNames: moment.monthsShort(),
            firstDay: moment.localeData()._week.dow
	 	}
	 });
});
</script>
</@scripts>